
String.isNull = function (str) {
	if (str == null) {
		return true;
	}
	if (str.trim().length == 0) {
		return true;
	}
	return false;
};
String.prototype.trim = function () {
	return this.replace(/^\s+|\s+$/g, "");
};
String.prototype.ltrim = function () {
	return this.replace(/^\s+/, "");
};
String.prototype.rtrim = function () {
	return this.replace(/\s+$/, "");
};
var changeView = function (target, htmlSrc) {
	target.innerHTML = htmlSrc;
};
var selectChangingObj = function (selectId, changeFunction) {
	var selectObj = document.getElementById(selectId);
	if (selectObj != null) {
		selectObj.onchange = changeFunction;
	}
};
var importJS = function (jsUrl) {
	var script = document.createElement("script");
	script.src = jsUrl;
	script.type = "text/javascript";
	script.defer = true;
	script.id = "scriptID";
	var head = document.getElementsByTagName("head").item(0);
	head.appendChild(script);
};
var removeNode = function (nodeId) {
	var JS = document.getElementById("scriptID");
	if (JS) {
		JS.parentNode.removeChild(old);
	}
};
var defaultOpenWindowSetting = "";
function openWindow(url, setting) {
	if (String.isNull(setting)) {
		window.open(url, setting);
	} else {
		window.open(url, defaultOpenWindowSetting);
	}
}

